<template>
  <div>
    <el-button type="text" @click="$router.go(-1)">返回</el-button>
    <el-card shadow="never">
      <h3>{{ data.title }}</h3>
      <span class="time">{{ data.createTime | formatDate2 }}</span>
    </el-card>
    <br>
    <el-card shadow="never">
      <div v-html="data.content" />
    </el-card>
  </div>
</template>

<script>
import * as noticeApi from '@/api/notice'
export default {
  name: '',
  data() {
    return {
      data: {}
    }
  },
  created() {
    noticeApi.getById(this.$route.params.id).then(resp => {
      this.data = resp.data
    })
  },
  methods: {
  }
}
</script>

<style lang="scss" scoped>
.time{
    font-size: 12px;
    color: #999;
}
</style>
